﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace ExamServer.Migrations
{
    public partial class addmenus : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("a1bde433-eecf-4012-b458-964f9dbd3d9a"));

            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("c655309a-df68-4249-af7c-7faf6b244960"));

            migrationBuilder.CreateTable(
                name: "tbMenus",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    name = table.Column<string>(nullable: false),
                    icon = table.Column<string>(nullable: true),
                    url = table.Column<string>(nullable: true),
                    Pid = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_tbMenus", x => x.Id);
                });

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark", "Test" },
                values: new object[] { new Guid("1d52f583-5170-446f-9b68-694b5334ef4a"), "1990-01-01", "zhangsan@163.com", "张三", "123456", null, null });

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark", "Test" },
                values: new object[] { new Guid("0268d31d-7080-4406-982a-ced1ac6e5781"), "1992-01-01", "lisi@qq.com", "李四", "123456", null, null });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "tbMenus");

            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("0268d31d-7080-4406-982a-ced1ac6e5781"));

            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("1d52f583-5170-446f-9b68-694b5334ef4a"));

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark", "Test" },
                values: new object[] { new Guid("c655309a-df68-4249-af7c-7faf6b244960"), "1990-01-01", "zhangsan@163.com", "张三", "123456", null, null });

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark", "Test" },
                values: new object[] { new Guid("a1bde433-eecf-4012-b458-964f9dbd3d9a"), "1992-01-01", "lisi@qq.com", "李四", "123456", null, null });
        }
    }
}
